home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Business Assistant
/
Business Assistant.iso
/
home
/
chkmstr
/
actc99.prg
< prev
next >
Wrap
Text File
|
1990-03-05
|
4KB
|
242 lines
USE ACCTC
END= " "
EXT= " "
GO BOTTOM
RECD=RECNO()
IF RECD=1
RECD=0
ENDIF
SET INDEX TO ACCTC
HC=0
DO WHILE UPPER(END) <> "E"
IF HC=0
CLEAR
@2,15 SAY "******** BUSINESS ACCOUNT FILE DISTRIBUTION ********"
GO BOTTOM
@4,5 SAY C01
@4,30 SAY C05
@4,55 SAY C09
@5,5 SAY C02
@5,30 SAY C06
@5,55 SAY C10
@6,5 SAY C03
@6,30 SAY C07
@6,55 SAY C11
@7,5 SAY C04
@7,30 SAY C08
@7,55 SAY C12
IF CHOICE= "A"
LP=0
DO WHILE EXT <> "N"
EXT= " "
IF LP=0
INSERT BLANK
ENDIF
@14,3 SAY "CODE" GET ACCT_CODE PICTURE "!99"
@14,14 SAY "DESCRIPTION" GET DESCRPT
@14,42 SAY "AMOUNT" GET AMOUNT
DO WHILE .NOT. (UPPER(EXT) $ 'YN')
@14,63 SAY "MORE { Y/N? }" GET EXT
READ
EXT=UPPER(EXT)
ENDDO
STORE LEFT(ACCT_CODE,1) TO ACODE
IF ACODE <> "C"
SET COLOR TO R*/W
@11,2 SAY "INVALID ACCOUNT CODE ENTERED."
@12,2 SAY "RE-ENTER !!"
LP=1
IF ISCOLOR()
SET COLOR TO W/B
ELSE
SET COLOR TO
ENDIF
LOOP
ENDIF
@11,0
@12,0
LP=0
IF ACCT_CODE= "C07"
REPLACE DESCRPT WITH "MILAGE"
VALU=AMOUNT
VALU= MILE*.01*VALU
REPLACE AMOUNT WITH VALU
ENDIF
REPLACE DATE WITH MDATE
IF EXT= "N"
EXIT
ENDIF
ENDDO
ELSE
LP=0
DO WHILE .T.
IF LP=0
INSERT BLANK
ENDIF
@10,10 SAY "AMOUNT REMAINING $$ " + STR(AMOUNTM,7,2)
@14,10 SAY "CODE" GET ACCT_CODE PICTURE "!99"
@14,22 SAY "DESCRIPTION" GET DESCRPT
@14,50 SAY "AMOUNT" GET AMOUNT
READ
STORE LEFT(ACCT_CODE,1) TO ACODE
IF ACODE <> "C"
SET COLOR TO R*/W
@11,2 SAY "INVALID ACCOUNT CODE ENTERED."
@12,2 SAY "RE-ENTER !!"
LP=1
IF ISCOLOR()
SET COLOR TO W/B
ELSE
SET COLOR TO
ENDIF
LOOP
ENDIF
@11,0
@12,0
LP=0
REPLACE DATE WITH MDATE
AMOUNTM=AMOUNTM-AMOUNT
IF AMOUNTM=0
EXIT
ENDIF
ENDDO
ENDIF
CLEAR
@1,15 SAY "******** BUSINESS ACCOUNT FILE DISTRIBUTION ********"
@3,30 SAY "VERIFY ENTRIES !!!!"
@5,5 SAY C01
@5,30 SAY C05
@5,55 SAY C09
@6,5 SAY C02
@6,30 SAY C06
@6,55 SAY C10
@7,5 SAY C03
@7,30 SAY C07
@7,55 SAY C11
@8,5 SAY C04
@8,30 SAY C08
@8,55 SAY C12
ENDIF
SET ORDER TO 0
GO (RECD+1)
@9,0
HC=0
DO WHILE .NOT. EOF()
@ROW()+1,5 SAY "CODE" GET ACCT_CODE PICTURE "!99"
@ROW(),14 SAY "DESCRIPTION" GET DESCRPT
@ROW(),39 SAY "AMOUNT" GET AMOUNT
@ROW(),54 SAY "DATE" GET DATE
@ROW(),69 SAY "RCD # " + STR(RECNO(),2)
SKIP
IF ROW()=21
@23,0
WAIT
@9,0 CLEAR
@9,0
LOOP
ENDIF
ENDDO
END= " "
@23,5 SAY "TO ADD ENTRY: TYPE { A }; CHANGE ENTRY: TYPE { C } ;
EXIT: TYPE { E } !!"
DO WHILE .NOT.(UPPER(END) $ 'ACE')
WAIT " " TO END
ENDDO
IF UPPER(END)= "A" .AND. UPPER(CHOICE) <> "A"
@23,0
SET COLOR TO R*/W
@22,10 SAY "INVALID OPERATION ATTEMPTED !!"
WAIT
IF ISCOLOR()
SET COLOR TO W/B
ELSE
SET COLOR TO
END= "C"
ENDIF
ENDIF
IF UPPER(END)= "A" .AND. UPPER(CHOICE) = "A"
END= " "
EXT= " "
LOOP
ENDIF
IF UPPER(END)= "C"
SET ORDER TO 0
GO (RECD+1)
CLEAR
@2,15 SAY "******** BUSINESS ACCOUNT FILE DISTRIBUTION ********"
@4,30 SAY "CHANGE ENTRIES !!!!"
@6,5 SAY C01
@6,30 SAY C05
@6,55 SAY C09
@7,5 SAY C02
@7,30 SAY C06
@7,55 SAY C10
@8,5 SAY C03
@8,30 SAY C07
@8,55 SAY C11
@9,5 SAY C04
@9,30 SAY C08
@9,55 SAY C12
@11,21 SAY "ENTER THE RECORD NUMBER { RCD } OF THE"
@12,21 SAY " RECORD IN ERROR AND MAKE CORRECTIONS."
@14,21 SAY " LEAVE { RCD } BLANK AND PRESS"
@15,21 SAY " { ENTER } WHEN FINISHED !!"
LP=0
DO WHILE .T.
IF LP=0
DC=0
@17,21 SAY "RECORD NUMBER { RCD } " GET DC
@19,0
READ
@18,0
IF DC=0
HC=1
@9,0 CLEAR
END= "A"
EXIT
ENDIF
GO BOTTOM
EC=RECNO()
IF DC>EC
@18,19 SAY "** INVALID RECORD NUMBER ! ** REENTER."
LOOP
ENDIF
GOTO DC
@17,0
ENDIF
@17,21 SAY "RECORD NUMBER { RCD } " + STR(RECNO(),2)
@19,2 SAY "ACCT. CODE" GET ACCT_CODE PICTURE "!99"
@19,18 SAY "DESCRIPTION" GET DESCRPT
@19,43 SAY "AMOUNT" GET AMOUNT
@19,58 SAY "DATE" GET DATE
READ
STORE LEFT(ACCT_CODE,1) TO ACODE
IF ACODE <> "C"
LP=1
SET COLOR TO R*/W
@16,2 SAY "INVALID ACCOUNT CODE ENTERED."
@17,2 SAY "RE-ENTER !!"
IF ISCOLOR()
SET COLOR TO W/B
ELSE
SET COLOR TO
ENDIF
LOOP
ENDIF
@16,0
@17,0
LP=0
ENDDO
ENDIF
ENDDO
SET ORDER TO 1
DELETE FOR AMOUNT=0
PACK
CLEAR
IF CHOICE = "B" .AND. DONE <> "N"
DO ACCTEXT
ENDIF
CHOICE= " "
RETURN